<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

class Test_event extends CI_Controller {

    public function __construct() {
        parent::__construct();
        session_start();
        $this->load->library('template');
        $this->load->helper('url');
        $this->load->helper('user_helper');
        $this->template->set_template('default');

        $this->template->add_css('public/css/bootstrap.css');
        $this->template->add_css('public/css/bootstrap-responsive.css');


//        $this->template->add_js('public/js/jquery-1.9.1.js');
        $this->template->add_js('public/js/jquery-1.11.0.min.js');
//        $this->template->add_js('public/js/jquery.min.js');
        $this->template->add_js('public/js/bootstrap.min.js');
        $data["newUrl"] = base_url() . "index.php/event/";
        $data["createEventUrl"] = base_url() . "index.php/event/create";
        $data["loginUrl"] = base_url() . "index.php/user/";
        $data["chatUrl"] = base_url() . "index.php/chat/";
        $data["registerUrl"] = base_url() . "index.php/user/register";
        $this->template->write_view('header', 'top_menu', $data, TRUE);
    }

    public function index() {
        //test save
        $this->load->model('mevent');
        $data = array();
        $data["title"] = "1111test111";
        $data["description"] = "hehehestabc";
        $data['id'] = "2";
//        var_dump($this->mevent->save($data));
//        var_dump($this->mevent->delete('1'));
        var_dump($this->mevent->getEventById('3'));
    }

}

